﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;

namespace ServiceLayer
{
    [DataContract]
    public class ParkDTO
    {
        [DataMember]
        public string Name { set; get; }

        [DataMember]
        public int Id { set; get; }

        [DataMember]
        public PolygonDTO Location { set; get; }

        [DataMember]
        public int NumberOfSlots { set; get; }

        [DataMember]
        public int NumberOfAvailableSlots { set; get; }
        
        internal ParkDTO(BusinessLayer.Park park)
        {
            Name = park.Name;
            Id = park.Id;
            Location = new PolygonDTO(park.Location);
            NumberOfSlots = park.NumberOfSlots;
            NumberOfAvailableSlots = park.NumberOfAvailableSlots;
        }
    }
}